#!/bin/sh
echo delete the old image
docker rmi eureka -f
docker rmi producer1 -f
docker rmi producer2 -f
docker rmi gateway -f

echo build the image ...
docker build --build-arg JAR_FILE=Eureka-0.0.1-SNAPSHOT.jar -t eureka .
docker build --build-arg JAR_FILE=producer-0.0.1-SNAPSHOT-1.jar -t producer1 .
docker build --build-arg JAR_FILE=producer-0.0.1-SNAPSHOT-2.jar -t producer2 .
docker build --build-arg JAR_FILE=gateway-0.0.1-SNAPSHOT.jar -t gateway .

echo build end.
echo run the docker
docker-compose up -d